<template>
  <div style="padding-bottom: 5px">
    <el-row :gutter="10">
      <el-col :span="17">
        <el-input v-model="value.searchresult" size="mini">
          <el-button slot="append" icon="el-icon-search" @click="search()" />
        </el-input>
      </el-col>
      <el-col :span="7">
        <div v-if="value.filters.isShow" style="line-height: 28px;height: 28px">
          <el-link :underline="false" @click="drawer = true">
            <i class="el-icon-setting el-icon--right" />&nbsp;高级搜索
          </el-link>
        </div>
      </el-col>
    </el-row>
    <el-drawer
      title="高级搜索"
      :visible.sync="drawer"
      :direction="direction"
    >
      <loader :vue-name="value.filters.vueName" :src="value.filters.src" :data="value.filters.data" />
    </el-drawer>
  </div>
</template>
<script>
import loader from './entryloader.vue'
export default {
  components: {
    loader
  },
  props: {
    value: {
      type: Object,
      // eslint-disable-next-line vue/require-valid-default-prop
      default: {}
    }
  },
  data() {
    return {
      drawer: false,
      direction: 'rtl'
    }
  },
  methods: {
    search() {
      this.$emit('searchmethod')
    }
  }
}
</script>
